﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IShift
    {
        [OperationContract]
        int Shift_Using(int ShiftID);

        [OperationContract]
        DataSet Shift_GetAll();

        [OperationContract]
        DataSet Shift_GetAllByDepartment(int DrpartmentID);

        [OperationContract]
        ShiftInfo Shift_GetInfo(int ShiftID);

        [OperationContract]
        DataSet Shift_GetList(out int ItemCount, int currentPage, int pageSize,int DeptID);

        [OperationContract]
        int Shift_Insert(ShiftInfo eInfo);

        [OperationContract]
        bool Shift_Update(ShiftInfo eInfo);

        [OperationContract]
        bool Shift_Delete(int ShiftID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class ShiftInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }

        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        string _TimeIn;
        [DataMember]
        public string TimeIn
        {
            get { return _TimeIn; }
            set { _TimeIn = value; }
        }
        string _TimeOut;
        [DataMember]
        public string TimeOut
        {
            get { return _TimeOut; }
            set { _TimeOut = value; }
        }
        string _TimeInB;
        [DataMember]
        public string TimeInB
        {
            get { return _TimeInB; }
            set { _TimeInB = value; }
        }
        string _TimeOutB;
        [DataMember]
        public string TimeOutB
        {
            get { return _TimeOutB; }
            set { _TimeOutB = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }

}
